﻿using System;
using System.Collections.Generic;
using System.Text;
using SH;

namespace MTS
{
    internal class mtTool
    {
		static string GetProgramName(emProgramType pt)
		{
			switch (pt)
			{
				case emProgramType.emPT_Unknown: return "Unknown";
				case emProgramType.emPT_IPS3D: return "IPS3D";
				case emProgramType.emPT_SCS: return "SCS";
				case emProgramType.emPT_SMS: return "SMS";
				case emProgramType.emPT_DET: return "DET";
				case emProgramType.emPT_PLC: return "PLC";
				case emProgramType.emPT_RCC: return "RCC";
				case emProgramType.emPT_RCG: return "RCG";
				case emProgramType.emPT_RCS: return "RCS";
				case emProgramType.emPT_CSS: return "CSS";
				case emProgramType.emPT_VUE: return "VUE";
				case emProgramType.emPT_SCA: return "SCA";
				case emProgramType.emPT_OPT: return "OPT";//操作站
				case emProgramType.emPT_MTA: return "MTA";//维护站
				case emProgramType.emPT_PCK: return "PCK";//预检站
				case emProgramType.emPT_CBS: return "CBS";//开包站
				case emProgramType.emPT_IPSS: return "IPSS";//判图服务
				case emProgramType.emPT_IPC: return "IPC";//判图服务客户端
				case emProgramType.emPT_DMS: return "DMS";// 设备管理服务
				case emProgramType.emPT_CFS: return "CFS";
				default:
					return "Unknown";
			}
		}

		public	static emStationType GetStationTypeByProgramType(emProgramType pt)
		{
			switch (pt)
			{
				case emProgramType.emPT_Unknown: return emStationType.emSTT_Unknown;
				case emProgramType.emPT_IPS3D: return emStationType.emSTT_IPS;
				case emProgramType.emPT_SCS: return emStationType.emSTT_SCS;
				case emProgramType.emPT_SMS: return emStationType.emSTT_SMS;
				case emProgramType.emPT_DET: return emStationType.emSTT_SCS;
				case emProgramType.emPT_PLC: return emStationType.emSTT_SCS;
				case emProgramType.emPT_RCC: return emStationType.emSTT_RCC;
				case emProgramType.emPT_RCG: return emStationType.emSTT_RCG;
				case emProgramType.emPT_RCS: return emStationType.emSTT_CSS;
				case emProgramType.emPT_CSS: return emStationType.emSTT_CSS;
				case emProgramType.emPT_VUE: return emStationType.emSTT_VUE;
				case emProgramType.emPT_SCA: return emStationType.emSTT_SMS;
				case emProgramType.emPT_OPT: return emStationType.emSTT_OPT;//操作站
				case emProgramType.emPT_MTA: return emStationType.emSTT_MTA;//维护站
				case emProgramType.emPT_PCK: return emStationType.emSTT_PCK;//预检站
				case emProgramType.emPT_CBS: return emStationType.emSTT_CBS;//开包站
				case emProgramType.emPT_IPSS: return emStationType.emSTT_IPSS;//判图服务
				case emProgramType.emPT_IPC: return emStationType.emSTT_IPSS;//判图服务客户端
				case emProgramType.emPT_DMS: return emStationType.emSTT_SMS;// 设备管理服务
				case emProgramType.emPT_CFS: return emStationType.emSTT_IPS;

				default:
					return emStationType.emSTT_Unknown;
			}
		}
		public static bool IsServer(emProgramType pt)
		{
			switch (pt)
			{
				case emProgramType.emPT_Unknown: return false;
				case emProgramType.emPT_IPS3D: return false;
				case emProgramType.emPT_SCS: return false;
				case emProgramType.emPT_SMS: return true;
				case emProgramType.emPT_DET: return false;
				case emProgramType.emPT_PLC: return false;
				case emProgramType.emPT_RCC: return false;
				case emProgramType.emPT_RCG: return false;
				case emProgramType.emPT_RCS: return false;
				case emProgramType.emPT_CSS: return true;
				case emProgramType.emPT_VUE: return false;
				case emProgramType.emPT_SCA: return false;
				case emProgramType.emPT_OPT: return false;    //操作站
				case emProgramType.emPT_MTA: return false;    //维护站
				case emProgramType.emPT_PCK: return false;    //预检站
				case emProgramType.emPT_CBS: return false;    //开包站
				case emProgramType.emPT_IPSS: return true;    //判图服务
				case emProgramType.emPT_IPC: return false;    //判图服务客户端
				case emProgramType.emPT_DMS: return true;	// 设备管理服务
				case emProgramType.emPT_CFS: return false;
				default:
					return false;
			}
		}

	}
}
